/**
 * Copyright &copy; 2012-2017 <a href="http://minglisoft.cn">HongHu</a> All rights reserved.
 */
package com.honghu.cloud.feign;

import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.honghu.cloud.dto.GoodsDto;


/**
 * 区域配置feign调用类
 * @author Administrator
 *
 */
@FeignClient(name="honghu-goods-service" ,path="goods")
public interface GoodsFeignClient{

	
	/**
	 * 根据商品id查询商品
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "/apiForFeign/selectByPrimaryKey", method = RequestMethod.GET)
	public GoodsDto selectByPrimaryKey(@RequestParam("id")Long id);
	
	
	@RequestMapping(value = "/apiForFeign/updateById", method = RequestMethod.POST)
	public void updateById(@RequestBody GoodsDto obj);
	
	/**
	 * 查询拼团商品规格值价格(feign调用)
	 * @param uid 用户id
	 * @param gsp 规格id，多个逗号分隔
	 * @param id 商品id
	 * @return
	 */
	@RequestMapping(value="/apiForFeign/loadPinGoodsPriceByGsp")
	public String loadPinGoodsPriceByGsp(@RequestParam("id")Long uid, @RequestParam("gsp")String gsp, @RequestParam("goodsId")String goodsId);
	
	@RequestMapping(value = "/apiForFeign/list", method = RequestMethod.POST)
	public Map<String, Object> list(@RequestBody Map<String, Object> params);
	
}